package com.ruoyi.withdrawal.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.withdrawal.mapper.WithdrawalApplicationMapper;
import com.ruoyi.withdrawal.domain.WithdrawalApplication;
import com.ruoyi.withdrawal.service.IWithdrawalApplicationService;

/**
 * 提现申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-20
 */
@Service
public class WithdrawalApplicationServiceImpl implements IWithdrawalApplicationService 
{
    @Autowired
    private WithdrawalApplicationMapper withdrawalApplicationMapper;

    /**
     * 查询提现申请
     * 
     * @param id 提现申请主键
     * @return 提现申请
     */
    @Override
    public WithdrawalApplication selectWithdrawalApplicationById(Long id)
    {
        return withdrawalApplicationMapper.selectWithdrawalApplicationById(id);
    }

    /**
     * 查询提现申请列表
     * 
     * @param withdrawalApplication 提现申请
     * @return 提现申请
     */
    @Override
    public List<WithdrawalApplication> selectWithdrawalApplicationList(WithdrawalApplication withdrawalApplication)
    {
        return withdrawalApplicationMapper.selectWithdrawalApplicationList(withdrawalApplication);
    }

    /**
     * 新增提现申请
     * 
     * @param withdrawalApplication 提现申请
     * @return 结果
     */
    @Override
    public int insertWithdrawalApplication(WithdrawalApplication withdrawalApplication)
    {
        withdrawalApplication.setCreateTime(DateUtils.getNowDate());
        return withdrawalApplicationMapper.insertWithdrawalApplication(withdrawalApplication);
    }

    /**
     * 修改提现申请
     * 
     * @param withdrawalApplication 提现申请
     * @return 结果
     */
    @Override
    public int updateWithdrawalApplication(WithdrawalApplication withdrawalApplication)
    {
        withdrawalApplication.setUpdateTime(DateUtils.getNowDate());
        return withdrawalApplicationMapper.updateWithdrawalApplication(withdrawalApplication);
    }

    /**
     * 批量删除提现申请
     * 
     * @param ids 需要删除的提现申请主键
     * @return 结果
     */
    @Override
    public int deleteWithdrawalApplicationByIds(Long[] ids)
    {
        return withdrawalApplicationMapper.deleteWithdrawalApplicationByIds(ids);
    }

    /**
     * 删除提现申请信息
     * 
     * @param id 提现申请主键
     * @return 结果
     */
    @Override
    public int deleteWithdrawalApplicationById(Long id)
    {
        return withdrawalApplicationMapper.deleteWithdrawalApplicationById(id);
    }
}
